#pragma once
#include "vn/EndPoint.h"

NET_USING

namespace TestStub {

class AEndPoint : public EndPoint {
public:
	virtual short GetAddressFamily() const {
		return data.sa_family;
	}

	virtual LPCChar GetData() const {
		return (LPCChar)&data;
	}

	virtual LPChar GetData() {
		return (LPChar)&data;
	}

	virtual int GetLength() const {
		return sizeof(sockaddr);
	}

	sockaddr data;
};

} // end TestStub

void EndPointTest() {_test_func_;
	const EndPoint &a = TestStub::AEndPoint();
	const	TestStub::AEndPoint b;

	//a = b;

	// note: ptr is a point to member of a
	// GetSize or GetLength?
	LPCChar ptr = a.GetData();
	int len = a.GetLength();
}
